package gang.com.mobelhelper.data.remote;


import gang.com.mobelhelper.bean.AppInfo;
import gang.com.mobelhelper.bean.BaseBeano;
import gang.com.mobelhelper.bean.PageBean;
import gang.com.mobelhelper.data.http.ApiService;
import rx.Observable;

/**
 * Created by xiaogangzai on 2017/7/12.
 * Model层 数据处理层
 */

public class RecommendModel {
    private ApiService mApiService;

    //通过构造方法传递
    public RecommendModel(ApiService mApiService) {
        this.mApiService = mApiService;
    }

    //获取这个数据
    public Observable<BaseBeano<PageBean<AppInfo>>> getApps() {
        // HttpManage httpmange = new HttpManage();
        // ApiService apiService = httpmange.getRetrofit(httpmange.getOkHttpClient()).create(ApiService.class);
        //mApiService.getApps("{'page':0}").enqueue(callback);
        return mApiService.getApps("{'page':1}");
    }
}
